package com.gexiaobao.pigeon.app.event

import com.gexiaobao.pigeon.app.model.TrainingBaseInfoBean
import com.gexiaobao.pigeon.app.model.bean.BloodPigeonBasicInfoResponse
import com.gexiaobao.pigeon.app.model.bean.CommonBean
import com.gexiaobao.pigeon.app.model.bean.EventResultBean
import com.gexiaobao.pigeon.app.model.bean.TrainingResultResponse
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.callback.livedata.event.EventLiveData

/**
 * 作者　: hegaojian
 * 时间　: 2019/5/2
 * 描述　:APP全局的ViewModel，可以在这里发送全局通知替代EventBus，LiveDataBus等
 */
class EventViewModel : BaseViewModel() {

    //全局收藏，在任意一个地方收藏或取消收藏，监听该值的界面都会收到消息
//    val collectEvent = EventLiveData<CollectBus>()

    //通知刷新列表
    val toRefreshList = EventLiveData<Boolean>()

    //通知刷新订单列表（商城）
    val toRefreshListShopOrder = EventLiveData<Boolean>()

    //通知设备掉线重新登录
    val toGoToLogin = EventLiveData<String>()

    //通知刷新列表
    val toRefreshBloodPigeonInfo = EventLiveData<Boolean>()
    val toRefreshBloodPigeonInfoInt = EventLiveData<Int>()

    //通知比赛入口是否在组织点击进入
    val toIntoType = EventLiveData<Int>()

    //通知赛鸽更改成功
    val toModifyPigeonResult = EventLiveData<Int>()

    //单只训放开启成功
    val singleTrainingSuccess = EventLiveData<Boolean>()

    //结束训放成功
    val stopTrainingSuccess = EventLiveData<Boolean>()

    //登录过期 通知去登录
    val goToLogin = EventLiveData<Boolean>()

    val isLogin = EventLiveData<Boolean>()

    //点击更多比赛条目返回上一个页面刷新列表数据
    val moreRace = EventLiveData<EventResultBean>()

    //训放基本信息-获取经纬度失败通知
    val getLonLatFailed = EventLiveData<Boolean>()

    //webSocket刷新比赛结果
    val trainingResult = EventLiveData<ArrayList<TrainingResultResponse.ResultList>>()

    //webSocket刷新训放基本信息
    val trainingBaseInfoResult = EventLiveData<TrainingBaseInfoBean>()

    //修改头像成功
    val headIconResult = EventLiveData<Boolean>()

    //血统图-导图赛鸽信息
    val bloodPigeonInfoResult = EventLiveData<BloodPigeonBasicInfoResponse>()

    //加入购物车成功
    val addShopCarResult = EventLiveData<Boolean>()

    //通知是否有已失效的商品
    val isInvalidProduct = EventLiveData<Int>()

    //通知退款
    val refundReturnResult = EventLiveData<Boolean>()

    //通知购物车清空
    val shopCarEmptyResult = EventLiveData<Boolean>()

    //通知认证状态
    val toNoticeIsCertified = EventLiveData<Boolean>()

    //通知退货提交成功
    val toNoticeReturnGoods = EventLiveData<Boolean>()

    //通知付款成功
    val toNoticePaySuccess = EventLiveData<Boolean>()

    //通知回到主页面
    val toNoticeBackHome = EventLiveData<Boolean>()

    //通知已确认收货
    val toNoticeReceivedGoods = EventLiveData<Boolean>()

    //通知搜索的足环号
    val toNoticeRingId = EventLiveData<String>()

    val toIntentId = EventLiveData<String>()

    val toNotifyId = EventLiveData<Int>()

    /** 通知用户已经同意隐私政策 */
    val isFirst = EventLiveData<Boolean>()

    /** 通知刷新（通用Boolean） */
    val toRefreshData = EventLiveData<Boolean>()

    /** 通知刷新（通用String） */
    val toRefreshDataStr = EventLiveData<String>()

    /** 通知刷新（通用String） */
    val toRefreshDataInt = EventLiveData<Int>()

    /**  */
    val toRefreshDataCommon = EventLiveData<CommonBean>()

    val toNotifyChangeAddress = EventLiveData<Int>()

    val toNotifyHistoryRaceInfo = EventLiveData<Int>()

    /** 通知退出聊天 */
    val toNotifyOutChat = EventLiveData<Int>()

    /** 通知比赛名称刷新 */
    val toNotifyRaceName = EventLiveData<String>()

    val toRefreshPair = EventLiveData<Boolean>()
}